package com._5704.website.config;


import com._5704.website.filter.JwtInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

//@Configuration
//废弃
@Deprecated

public class JwtInterceptorConfig implements WebMvcConfigurer {
    @Resource
    public JwtInterceptor jwtInterceptor;
    /**
     * Jwt拦截器配置类
     * @param registry 无
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(jwtInterceptor)
                .addPathPatterns("/**")
                .excludePathPatterns("/user/login","/user/register","/user/unauthorized");
    }

}
